<template>
  <div class="">
    <button @click="test"> {{ name }}</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      name: 'zhangsan'
    }
  },
  methods: {
    test() {
      alert(this.name)
    }
  }
}
</script>

<style scoped lang="scss"></style>